const joi = require('joi')  // 引入joi模块

const id = joi.number().integer().min(1).required()
const name = joi.string().required()

exports.add = { body: { name } }
exports.put = { body: { name, id } }
exports.del = { query: { id } }